             package com.java.diagnostics.visualizer.recommender;
             
             import com.java.diagnostics.visualizer.data.AggregateData;
             import com.java.diagnostics.visualizer.data.TupleData;
             import com.java.diagnostics.visualizer.gc.recommender.RecommendationPreferenceHelper;
             import com.java.diagnostics.visualizer.recommender.util.RecommendationLabels;
             import java.text.MessageFormat;
             
             public class CalculateOpinionOnTenuring
               extends RecommendationBase
               implements Recommendation
             {
               public void recommend(AggregateData data)
               {
                 Object gcMode = getGCMode(data);
                 if ("gencon".equals(gcMode)) {
                   TupleData amountTenured = data
                     .getTupleData("VGCLabels.amount.tenured");
                   if ((amountTenured != null) && (!amountTenured.isEmpty())) {
                     TupleData nurserySize = data
                       .getTupleData("VGCLabels.nursery.size");
                     if ((nurserySize != null) && (!nurserySize.isEmpty())) {
                       double meanTenured = amountTenured.getRawMeanY();
                       double meanNursery = nurserySize.getRawMeanY();
                       double fraction = meanTenured / meanNursery;
                       int percent = (int)(fraction * 100.0D);
                       if (percent > this.helper.getExcessiveTenuringThreshold())
                       {
                         String comment = MessageFormat.format(
                           RecommendationLabels.TOO_MUCH_TENURING, 
                           new Object[] { Integer.valueOf(percent) });
                         addWarning(data, comment);
                       }
                     }
                   }
                 }
               }
             }


